home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1997-08-23 | 38.3 KB | 1,221 lines
/* ---------------------------------------------------------------- */ /* */ /* YAM-Expansion v1.9 */ /* */ /* (C) 1997 by Diego 'dx0' de Felice */ /* */ /* */ /* this program is freeware, but you cannot use the whole code or */ /* a part of it in your programs. */ /* ---------------------------------------------------------------- */ options results didi='' dido='' parse arg didi dido NoNotifySet = 0x8042216f Application_AboutMUI = 0x8042d21d Application_OpenConfigWindow = 0x804299ba Draggable = 0x80420b6e Listview_DragType = 0x80425cd3 List_Format = 0x80423c0a Weight = 0x80421d1f Numeric_Value = 0x8042ae3a Menuitem_Title = 0x804218be Menuitem_Shortcut = 0x80422030 Boopsi_MinHeight = 0x80422c93 Boopsi_MinWidth = 0x80428fb2 Boopsi_Remember = 0x8042f4bd Boopsi_TagScreen = 0x8042bc71 TRUE = 1 FALSE = 0 Listview_DragType_None = 0 Listview_DragType_Immediate = 1 Frame_None = 0 Frame_Text = 3 TriggerValue = 0x49893131 EveryTime = 0x49893131 MUIA_List_AutoVisible = 0x8042a445 MUIA_List_Format = 0x80423c0a MUIA_List_DragSortable = 0x80426099 List_Remove = 0x8042647e MUIA_List_Active = 0x8042391c MUIA_List_Insert_Bottom = -3 MUIV_List_Remove_Active = -1 MUIA_List_Entries = 0x80421654 MUIM_List_Redraw = 0x80427993 MUIM_List_Clear = 0x8042ad89 List_GetEntry = 0x804280ec Draggable = '0x80420b6e' Dirlist_RejectIcons = '0x80424808' Listview_DragType = '0x80425cd3' Listview_MultiSelect = '0x80427e08' Menuitem_Title = '0x804218be' Weight = '0x80421d1f' ShowMe = '0x80429ba8' MUIA_Window_PublicScreen = 0x804278e4 MUIA_List_Format = 0x80423c0a MUIA_List_Entries = 0x80421654 MUIA_String_Contents = 0x80428ffd MUIA_Group_SameHeight = 0x80428ffd MUIV_List_Insert_Sorted = -2 MUIV_List_Active_Off = -1 MUIM_List_Clear = 0x8042ad89 MUIA_List_Active = 0x8042391c MUIM_List_GetEntry = 0x804280ec selected= 0x8042654b askb0='Are you sure you want to modify' askb1='email ?' suff0='a Sent' suff1='an Incoming' suff2='an Archived' portazze=show('P') || ' ' frommo='Aminet mailing list maintainer <aminetd@wuarchive.wustl.edu>' giornal="Today's Aminet uploads on" settima="This week's Aminet uploads on" error1='This is not an Aminet-mailing-list email !!!' primadeifili ='|----------------- --- ---- -----------' primadeifilis='|----------------- --- ---- --- -----------' msgday='Message of the day:' msgmir='MIRROR STATUS:' statino=' Ready to serve you...' statinozzo='Yam-Expansion v1.9 by Dx0. Contact me at:d.defelice@ba.nettuno.it' address YAMEXP select when didi='RIMOZZO' then call removazzo when didi='MAKOZZO' then call makkolo when didi='FOKOZZO' then call fokkolo when didi='WRL' then call ritodrl when didi='WCH' then call riwekch when didi='WMD' then call riwekmd when didi='ADALL' then call selezionazzi when didi='FF' then call faiftp when didi='XIXI' then do text ID STATUS LABEL statino address YAMEXP window ID cicciotto CLOSE address command 'delete t:mess' address command 'delete t:moment' address command 'delete t:today' address command 'delete t:todrl' address command 'delete t:wekch' address command 'delete t:wekmd' end when didi='' then do if find(portazze,'YAM')=0 then do window ID DOZE COMMAND PORT YAMExp TITLE "Error Message" group label CENTER "Please start Yam first !!!" button ID ERR COMMAND '"quit"' PORT YAMEXP LABEL "Ok I'll do it" endgroup endwindow exit end call conamiga call faiwindoze end when didi='HTMLL' then call htmlla when didi='AGGI' then call aggiftpmail when didi='DAMME' then do address YAMEXP popasl ID BACIO batchio=result address command 'delete' batchio end when didi='BATOSTA' then do address YAMEXP popasl ID BACIO batchio=result window ID BICCIO PORT YAMExp TITLE """AmFtp Batch File Content""" group FRAME LABELS "AmFtp Batch File" view FILE batchio endgroup group HORIZ button COMMAND '"yamexp.rexx DAMME"' LABEL "Delete File" button COMMAND """window ID BICCIO CLOSE""" PORT YAMEXP LABEL "Exit" endgroup endwindow end when didi='RASSALO' then do tipozzolo=3 call ransignalo end when didi='RASGALO' then do tipozzolo=1 call ransignalo end when didi='RASTALO' then do tipozzolo=2 call ransignalo end when didi='SALVAGALO' then do ftpmailsites=word(dido,1) aminethtmlsites=word(dido,2) aminetftpsites=word(dido,3) call salvaamiga window ID WINDOZE CLOSE call faiwindoze end when didi='FICCALA' then do ftpmailsites=word(dido,1) aminethtmlsites=word(dido,2) aminetftpsites=word(dido,3) call amigala window ID WINDOZE CLOSE call faiwindoze end otherwise nop end exit /* ---------------------< Funzioni >-------------------------------------------------------------------------------------------------------------------- */ faiwindoze: window ID WINDOZE COMMAND "quit" PORT YAMExp TITLE """YAM-Expansion v1.9 (by dx0)""" group ID MMM REGISTER PORT YAMExp LABELS "Main,Configuration" group if feffone=1 then do group ID AMI1 FRAME LABELS "Aminet" button ID AMINETTER COMMAND '"YAMExp.rexx HTMLL"' HELP '"Create an html file from an Aminet recent email"' LABEL "Make Recent-HTML" button ID FTPIT COMMAND '"YAMExp.rexx FF"' HELP '"Create a ftpmail or an AmFtp batch file from an Aminet recent email"' LABEL "Ftp Section" endgroup end if sfeffeo=1 then do group ID SISSI FRAME LABELS "Sign" button ID RASI COMMAND '"YAMExp.rexx RASSALO"' HELP '"Sign the selected email with a random sign"' LABEL "Random Sign" button ID RANSSIGN COMMAND '"YAMExp.rexx RASGALO"' HELP '"Sign the selected email with a serious sign"' LABEL "Serious Sign" button ID RANNSIGN COMMAND '"YAMExp.rexx RASTALO"' HELP '"Sign the selected email with an informal sign"' LABEL "Informal Sign" endgroup end if pappone=1 then do button ID ABO COMMAND '"text ID STATUS LABEL Yam-Expansion v1.9 by Dx0"' PORT YAMEXP ICON "yamexpansion:data/icon" end endgroup cantatu=ftpmailsites aminethtmlsites aminetftpsites group group FRAME LABELS "Aminet" group HORIZ label CENTER "Ftpmail Url:" poplist ID SFTP COMMAND '"YAMExp.rexx AGGI 'cantatu'"' HELP '"Select the ftpmail URL"' LABELS ftpmailsites CONTENT ftpmailurl endgroup group HORIZ label CENTER "HTML Aminet Url:" poplist ID FTPLINK COMMAND '"YAMExp.rexx AGGI 'cantatu'"' HELP '"Select the Html Aminet Url"' LABELS aminethtmlsites CONTENT amineturl endgroup group HORIZ label CENTER "Aminet Ftp Url:" poplist ID FTPP COMMAND '"YAMExp.rexx AGGI 'cantatu'"' HELP '"Select the Ftp Aminet Url"' LABELS aminetftpsites CONTENT ftpsitu endgroup group HORIZ label CENTER "Aminet Dir:" string ID DIRRA HELP '"Enter the directory that holds Aminet"' CONTENT aminetdir endgroup group HORIZ label CENTER "AmFtp Batch File:" popasl ID BACIO HELP '"Enter the file name for the AmFtp batch file"' CONTENT batchfile endgroup group HORIZ check ID FB ATTRS selected baffone label CENTER "append entries to batch file" endgroup group HORIZ check ID RIB ATTRS selected raffone label CENTER "download .readme file" endgroup endgroup group FRAME LABELS "Signs" group HORIZ label CENTER "Serious Sign:" popasl ID SERSIGN HELP '"Select the serious signature file"' CONTENT seriaccio endgroup group HORIZ label CENTER "Informal Sign:" popasl ID INFSIGN HELP '"Select the informal signature file"' CONTENT gaglioffo endgroup endgroup group FRAME LABELS "Various" group HORIZ check ID SWIAM ATTRS selected feffone label CENTER "turn on the Aminet functions" endgroup group HORIZ check ID SWISI ATTRS selected sfeffeo label CENTER "turn on signatures functions" endgroup group HORIZ check ID ICOC ATTRS selected pappone label CENTER "turn on YamExpansion logo" endgroup endgroup group HORIZ button ID USAI COMMAND '"yamexp.rexx FICCALA 'cantatu'"' LABEL "Use" button ID SAVAI COMMAND '"yamexp.rexx SALVAGALO 'cantatu'"' LABEL "Save" endgroup endgroup endgroup text ID STATUS LABEL statino endwindow return /* ---------------------------------------------------------------- */ aggiftpmail: ftpmailsites=word(dido,1) aminethtmlsites=word(dido,2) aminetftpsites=word(dido,3) address YAMEXP poplist ID SFTP gingilli=result if pos(gingilli,ftpmailsites)=0 then do ftpmailsites=gingilli||','||ftpmailsites end address YAMEXP poplist ID FTPP gingillis=result if pos(gingillis,aminetftpsites)=0 then do aminetftpsites=gingillis||','||aminetftpsites end address YAMEXP poplist ID FTPLINK gingillia=result if pos(gingillia,aminethtmlsites)=0 then do aminethtmlsites=gingillia||','||aminethtmlsites end call amigala window ID WINDOZE CLOSE call faiwindoze return ransignalo: addlib('rexxsupport.library',0,-30) statino=' Signing your email...' address YAMEXP text ID STATUS LABEL statino address 'YAM' getfolderinfo NUMBER zainetto=result select when zainetto=0 then do 'request "'askb0 suff1 askb1'" "_Yes I want|_No sorry"' if result=0 then exit end end when zainetto=2 then do 'request "'askb0 suff0 askb1'" "_Yes I want|_No sorry"' if result=0 then exit end end when zainetto>2 then do 'request "'askb0 suff2 askb1'" "_Yes I want|_No sorry"' if result=0 then exit end end otherwise nop end select when tipozzolo=1 then do address YAMEXP popasl ID SERSIGN figoccio=result end when tipozzolo=2 then do address YAMEXP popasl ID INFSIGN figoccio=result end when tipozzolo=3 then do listarande=SHOWDIR('yamexpansion:ransigns','FILE',' ') mutrande=words(listarande) /* File random da appendere */ randa=random(1,mutrande,time(s)) figoccio='yamexpansion:ransigns/' || word(listarande,randa) end otherwise nop end call open(luvi,figoccio,'R') getmailinfo file /* File a cui appendere */ call open(infamona,result,'A') writeln(infamona,'--') writeln(infamona,'') do until EOF(luvi) /* Riempe l'email */ limazzaza=readln(luvi) writeln(infamona,limazzaza) end call close(infamona) /* Chiusura dei file */ call close(luvi) mailupdate statino=' Operation done, ready to serve you...' address YAMEXP text ID STATUS LABEL statino return /* ---------------------------------------------------------------- */ htmlla: statino=' Making your html file...' address YAMEXP text ID STATUS LABEL statino address YAMEXP poplist ID FTPLINK amineturl=result address YAMEXP string ID DIRRA aminetdir=result address 'YAM' getmailinfo from vediamo=compare(result,frommo) if vediamo~=0 then do 'request "'error1'" "_Oh sorry"' exit end else do getmailinfo sub eccolo=result getmailinfo file call open(carmela,result,'R') if find(eccolo,giornal) then do flaggo=0 call creafile('Daily.') call titola(eccolo) call tavolozza(primadeifili) call ilresto call chiudihtml(filo) call close(carmela) end if find(eccolo,settima) then do flaggo=1 call creafile('Weekly.') call titola(eccolo) call tavolozza(primadeifili) call chiudihtml(filo) flaggo=2 call creafile('MostDL.') titolomost='The most downloaded files from Aminet during the week until ' || daten call titola(titolomost) call tavolozza(primadeifilis) call chiudihtml(filo) call creafile('Charts.') titolochart='The highest rated programs during the week until ' || daten call titola(titolochart) call tavolozza(primadeifilis) call ilresto call chiudihtml(filo) call close(carmela) end address 'YAM' portazze=show('P') || ' ' if pos('VOYAGER',portazze)=0 & pos('IBROWSE',portazze)=0 & pos('AWEB',portazze)=0 & pos('MINDWALKER',portazze)=0 then do if flaggo=0 then do risultati='The file containing the list of files was named: ' nome 'request "'risultati'" "_Oh Thanks"' end if flaggo>0 then do risultati='The files were named: yamexpansion:html/Weekly.' || daten || '.html, yamexpansion:html/MostDL.' || daten || '.html, Yamexpansion:html/Chart.' || daten || '.html' 'request "'risultati'" "_Oh Thanks"' end end else do if flaggo=0 then call sballa(nome) if flaggo>0 then do selecta='Please select the page to send to your browser' angela=10 do while angela~=0 'request "'selecta'" "_Weekly Uploads|_Most downloaded|_Charts|_Exit"' angela=result if angela=1 then call sballa('yamexpansion:html/Weekly.'||daten||'.html') if angela=2 then call sballa('yamexpansion:html/MostDL.'||daten||'.html') if angela=3 then call sballa('yamexpansion:html/Charts.'||daten||'.html') end end end end statino=' Operation done. Ready to serve you...' address YAMEXP text ID STATUS LABEL statino return sballa: parse arg chiama /* Manda il file al browser */ if pos('VOYAGER',portazze)>0 then address 'VOYAGER' 'OpenURL file:///'|| chiama if pos('IBROWSE',portazze)>0 then address 'IBROWSE' 'GotoURL file:///' || chiama if pos('AWEB',portazze)>0 then do address value substr(portazze,pos('AWEB.',portazze),6) 'Open file://localhost/' || chiama end if pos('MINDWALKER',portazze)>0 then address 'MINDWALKER' 'OpenURL file:///'|| chiama return creafile: /* Creazione del file */ parse arg prex getmailinfo sub nome=right(result,11) nome=strip(nome) daten=nome nome='yamexpansion:html/' || prex || nome || '.html' call open(filo,nome,'W') return chiudihtml: /* Chiusura dell'html */ parse arg filoccioccio writeln(filo,'<center>') writeln(filo,'<hr>') writeln(filo,'<h4>Send comments and whatever you want to: <B>Diego dx0 de Felice <a href="mailto:d.defelice@ba.nettuno.it">d.defelice@ba.nettuno.it</B></a>') writeln(filo,'</H4>') writeln(filo,'<h5>Created with YAM-Expansion v1.0 by <a href="mailto:d.defelice@ba.nettuno.it">Diego dx0 de Felice</a></h5>') writeln(filo,'</center>') writeln(filo,'</body>') writeln(filo,'</html>') call close(filoccioccio) return titola: /* Intestazione */ parse arg subbo writeln(filo,'<HTML>') writeln(filo,'<HEAD>') writeln(filo,'<!DOCTYPE HTML PUBLIC "-//IETF//DD HTML 3.0//EN">') writeln(filo,'<!-- AUTHOR="Diego dx0 de Felice" -->') writeln(filo,'<!-- EMAIL="d.defelice@ba.nettuno.it" -->') writeln(filo,'<!-- COMMENT="Made by YAM-Expansion for YAM (by Marcel Beck)." -->') writeln(filo,'<TITLE>'|| subbo ||'</TITLE>') writeln(filo,'</HEAD>') writeln(filo,'<BODY bgcolor="#FFFFFF">') if subbo~='' then do /* Titolo del documento */ writeln(filo,'<p>') writeln(filo,'<ul>') writeln(filo,'<H2><li><strong>'|| subbo ||'</strong></H2>') writeln(filo,'</ul></p>') subbo='' end if flaggo=2 then writeln(filo,'<center><h3> Most popular file on top</h3></center>') return ilresto: /* Scrivacchia i messaggi dopo */ do until EOF(carmela) /* Se c'e' qualcosa dopo lo scrive */ lineazza=readln(carmela) if lineazza=msgday | lineazza=msgmir then do /* Messages */ writeln(filo,'<ul>') writeln(filo,'<H3><li><strong>'|| lineazza ||'</strong></H3>') writeln(filo,'</ul>') lineazza=readln(carmela) end writeln(filo,'<h5>'|| lineazza || '</H5>') end return tavolozza: /* Tavola */ parse arg primas writeln(filo,'<p>') writeln(filo,'<center><table border=3>') writeln(filo,'<TR>') /* prima riga standard */ writeln(filo,'<th bgcolor="#ffff00"><h3>File</h3></th>') writeln(filo,'<th bgcolor="#ffff00"><h3>Dir</h3></th>') writeln(filo,'<th bgcolor="#ffff00"><h3>Size</h3></th>') if flaggo=2 then writeln(filo,'<th bgcolor="#ffff00"><h3>Age</h3></th>') writeln(filo,'<th bgcolor="#ffff00"><h3>Description</h3></th>') writeln(filo,'</TR>') lineazza=readln(carmela) /* Salta l'intestazione */ do until lineazza=primas lineazza=readln(carmela) end do until lineazza='' /* Corpo della tabella */ lineazza=readln(carmela) if lineazza='' then writeln(filo,'</table></center><h6></h6></p><br>') /* Fine tabella */ sfile=substr(lineazza,1,18) sfile=compress(sfile,' ') sdir=substr(lineazza,20,10) sdir=compress(sdir,' ') ssize=substr(lineazza,31,4) ssize=compress(ssize,' ') sdescription=substr(lineazza,36,44) if flaggo=2 then do sage=substr(lineazza,36,3) sage=compress(sage,' ') sdescription=substr(lineazza,40,40) end linkolo=amineturl || aminetdir || sdir || '/' || sfile ciccia=verify(sfile,'.','m') leggilo=left(sfile,ciccia) readmelo=amineturl || aminetdir || sdir || '/' || leggilo || 'readme' writeln(filo,'<tr>') writeln(filo,'<td><h5><a href="'|| linkolo ||'">' || sfile || '</a></h5></td>') writeln(filo,'<td><h5>' || sdir || '</h5></td>') writeln(filo,'<td align=center><h5>' || ssize || '</h5></td>') if flaggo=2 then writeln(filo,'<td align=center><h5>' || sage || '</h5></td>') writeln(filo,'<td><h5><a href="'|| readmelo||'">' || sdescription || '</a></h5></td>') writeln(filo,'</tr>') end return conamiga: call open(amigascura,'yamexpansion:yamexp.config','R') amineturl=readln(amigascura) aminetdir=readln(amigascura) sfeffeo=readln(amigascura) feffone=readln(amigascura) ftpmailurl=readln(amigascura) gaglioffo=readln(amigascura) seriaccio=readln(amigascura) ftpsitu=readln(amigascura) batchfile=readln(amigascura) baffone=readln(amigascura) pappone=readln(amigascura) ftpmailsites=readln(amigascura) aminethtmlsites=readln(amigascura) aminetftpsites=readln(amigascura) raffone=readln(amigascura) call close(amigascura) return salvaamiga: call amigala call open(amigascura,'yamexpansion:YamExp.config','W') call writeln(amigascura,amineturl) call writeln(amigascura,aminetdir) call writeln(amigascura,sfeffeo) call writeln(amigascura,feffone) call writeln(amigascura,ftpmailurl) call writeln(amigascura,gaglioffo) call writeln(amigascura,seriaccio) call writeln(amigascura,ftpsitu) call writeln(amigascura,batchfile) call writeln(amigascura,baffone) call writeln(amigascura,pappone) call writeln(amigascura,ftpmailsites) call writeln(amigascura,aminethtmlsites) call writeln(amigascura,aminetftpsites) call writeln(amigascura,raffone) call close(amigascura) return amigala: poplist ID FTPLINK amineturl=result string ID DIRRA aminetdir=result check ID SWISI sfeffeo=result check ID SWIAM feffone=result poplist ID SFTP ftpmailurl=result popasl ID INFSIGN gaglioffo=result popasl ID SERSIGN seriaccio=result poplist ID FTPP ftpsitu=result popasl ID BACIO batchfile=result check ID FB baffone=result check ID ICOC pappone=result check ID RIB raffone=result return /* --------------------- FTP SECTION -------------------------- */ winsozz: address YAMEXP window ID cicciotto TITLE "Ftp-Section" PORT YAMEXP group group HORIZ label CENTER "Type:" text ID TIPPO LABEL "domani" object CLASS '"Balance.mui"' label CENTER "Date:" text ID DATTO LABEL "oggi" endgroup group ID FFF FRAME LABELS "List of Files in the email" list ID ZAM COMMAND '"YAMEXP.rexx ADALL"' TITLE '"\033bFile,\033bDirectory,\033bSize,\033bAge,\033bDescription"' INSERT NODUP ATTRS Listview_DragType Listview_DragType_Immediate Listview_MultiSelect Listview_MultiSelect_Shifted MUIA_List_Format '"P=\033l BAR,P=\033l BAR,P=\033c BAR,P=\033c BAR,P=\033l"' HELP '"Select the files to include in the list below"' group HORIZ label CENTER "Total Files in list:" text ID SNFIFFI LABEL 0 label CENTER "Total Size (Bytes):" text ID SNSIZZI LABEL 0 endgroup if tipox=1 then do group HORIZ button COMMAND '"YAMEXP.rexx WRL"' LABEL "Weekly Uploads" button COMMAND '"YAMEXP.rexx WMD"' LABEL "Most Downloaded" button COMMAND '"YAMEXP.rexx WCH"' LABEL "Aminet Chart" endgroup end button COMMAND '"YAMEXP.rexx ADALL"' LABEL "Add file(s) when the counters above have stopped" endgroup group FRAME LABELS "Selected Files" list ID SELEN COMMAND '"YAMEXP.rexx RIMOZZO"' TITLE '"\033bFile,\033bDirectory,\033bSize,\033bAge,\033bDescription"' INSERT NODUP ATTRS Listview_DragType Listview_DragType_Immediate Listview_MultiSelect Listview_MultiSelect_Shifted MUIA_List_Format '"P=\033l BAR,P=\033l BAR,P=\033c BAR,P=\033c BAR,P=\033l"' HELP '"Selected files to include in the ftpmail or in the batch file"' group HORIZ label CENTER "Selected Files:" text ID NFIFFI LABEL 0 label CENTER "Total Size (Bytes):" text ID NSIZZI LABEL 0 endgroup group HORIZ button COMMAND '"YAMEXP.rexx MAKOZZO"' LABEL "Make FtpMail" button COMMAND '"YAMEXP.rexx FOKOZZO"' LABEL "Make AmFtp Batch" button COMMAND '"YAMEXP.rexx BATOSTA"' LABEL "View Batch File" button COMMAND '"YAMEXP.rexx RIMOZZO"' HELP '"Remove selected files from list"' LABEL "Remove files" button COMMAND '"YAMEXP.rexx XIXI"' HELP '"Exit NOW"' LABEL "Exit Now" endgroup endgroup if messalina=1 then view ID MESSO HELP '"Messages of the day and mirror status"' FILE "t:mess" endgroup endwindow address YAMEXP method ID ZAM MUIM_List_Clear return removazzo: MUIV_List_Remove_Selected = -3 List_Remove = 0x8042647e address YAMEXP method ID SELEN List_Remove MUIV_List_Remove_Selected address YAMEXP list ID SELEN MUIA_List_Entries diddio=result address YAMEXP text ID NFIFFI LABEL diddio sizzini=0 do lilli=0 TO diddio address YAMEXP list ID SELEN POS lilli aca=result aca=translate(aca,' ',',') sdimension=word(aca,3) call carla sizzini=sizzini+sdimension address YAMEXP text ID NSIZZI LABEL sizzini end return selezionazzi: address YAMEXP text ID NFIFFI fiffini=result address YAMEXP text ID NSIZZI sizzini=result do forever address YAMEXP list ID ZAM entrata=result if entrata='' then return aca=translate(entrata,' ',',') sdimension=word(aca,3) call carla sizzini=sizzini+sdimension address YAMEXP text ID NSIZZI LABEL sizzini fiffini=fiffini+1 address YAMEXP text ID NFIFFI LABEL fiffini address YAMEXP list ID SELEN INSERT POS MUIV_List_Insert_Bottom STRING entrata end return fokkolo: statino=' Making batch file, please wait...' address YAMEXP text ID STATUS LABEL statino popasl ID BACIO batchfile=result check ID FB baffone=result check ID RIB raffone=result address YAMEXP list ID SELEN MUIA_List_Entries quanti=result address YAMEXP string ID DIRRA amidir=result select when baffone=1 then do if ~open(sfatti,batchfile,'A') then do call open(sfatti,batchfile,'W') end end when baffone=0 then call open(sfatti,batchfile,'W') end do lilli=0 TO quanti address YAMEXP list ID SELEN POS lilli aca=result if aca='' then do call close(sfatti) statino=' Batch file created. Ready to serve you...' address YAMEXP text ID STATUS LABEL statino return end aca=translate(aca,' ',',') sdimension=word(aca,3) call carla sfiletto=amidir||word(aca,2)||'/'word(aca,1)||'|'sdimension call writeln(sfatti,sfiletto) if raffone=1 then do rerra=word(aca,1) ciccia=verify(rerra,'.','m') rerre=left(rerra,ciccia) sfiletto=amidir||word(aca,2)||'/'||rerre||'readme|0' call writeln(sfatti,sfiletto) end end return makkolo: check ID RIB raffone=result address YAMEXP list ID SELEN MUIA_List_Entries quanti=result address YAMEXP string ID DIRRA amidir=result call open(fatti,'t:ppp','W') address YAMEXP poplist ID FTPP sytollo=result connessozzo='connect' sytollo call writeln(fatti,connessozzo) call writeln(fatti,'uuencode') do lilli=0 TO quanti address YAMEXP list ID SELEN POS lilli aca=result if aca='' then do call writeln(fatti,'quit') call close(fatti) address 'YAM' mailwrite address YAMEXP poplist ID SFTP zftpmazzo=result writemailto zftpmazzo subbolo='"Aminet files"' writesubject subbolo writeletter 't:ppp' writequeue address YAMEXP return end aca=translate(aca,' ',',') diritto='ls' amidir || word(aca,2) filetto='get' word(aca,1) call writeln(fatti,diritto) call writeln(fatti,filetto) if raffone=1 then do call writeln(fatti,diritto) rerra=word(aca,1) ciccia=verify(rerra,'.','m') rerre=left(rerra,ciccia) filetto='get' rerre||'readme' call writeln(fatti,filetto) end end return /* Listatori */ ritodrl: address YAMEXP method ID ZAM MUIM_List_Clear address YAMEXP text ID TIPPO LABEL "This week's Aminet uploads" call open(ftodrl,'t:todrl','R') call rito call close(ftodrl) return riwekmd: address YAMEXP method ID ZAM MUIM_List_Clear address YAMEXP text ID TIPPO LABEL "The most downloaded files from Aminet during the week" call open(ftodrl,'t:wekmd','R') call rito call close(ftodrl) return riwekch: address YAMEXP method ID ZAM MUIM_List_Clear address YAMEXP text ID TIPPO LABEL "The highest rated programs during the week" call open(ftodrl,'t:wekch','R') call rito call close(ftodrl) return rito: ciulone=0 siulone=0 do until EOF(ftodrl) bazz=readln(ftodrl) if ((bazz=',,,0,') | (bazz=',,,,')) then do ciulone=ciulone-1 address YAMEXP text ID SNFIFFI LABEL ciulone end else do aca=translate(bazz,' ',',') sdimension=word(aca,3) call carla siulone=siulone+sdimension address YAMEXP text ID SNSIZZI LABEL siulone ciulone=ciulone+1 address YAMEXP text ID SNFIFFI LABEL ciulone address YAMEXP list ID ZAM INSERT POS MUIV_List_Insert_Bottom STRING bazz end end return spezzettazza: parse arg lines prendimi=readln(carmelozza) do until prendimi=lines prendimi=readln(carmelozza) end do until lines='' lines=readln(carmelozza) fsfile=substr(lines,1,18) fsfile=compress(fsfile,' ') fsdir=substr(lines,20,10) fsdir=compress(fsdir,' ') fssize=substr(lines,31,4) fssize=compress(fssize,' ') fsdescription=substr(lines,36,44) fsage=0 if gibbo=1 then do fsage=substr(lines,36,3) fsage=compress(fsage,' ') fsdescription=substr(lines,40,40) end fsdescription=compress(fsdescription,',') bazz=fsfile || ',' || fsdir || ',' || fssize || ',' || fsage || ',' || fsdescription writeln(feffeo,bazz) end return faiftp: address 'YAM' show getmailinfo from vediamxo=compare(result,frommo) if vediamxo~=0 then do address YAM 'request "'error1'" "_Oh sorry"' exit end else do statino=' Making archive list please wait...' address YAMEXP text ID STATUS LABEL statino getmailinfo file call open(carmelosa,result,'R') call open(angelosa,'t:today','W') do until EOF(carmelosa) sxs=readln(carmelosa) writeln(angelosa,sxs) end call close(angelosa) call close(carmelosa) messalina=0 getmailinfo sub eccolo=result nome=right(result,11) nome=strip(nome) daten=nome if find(eccolo,giornal) then do tipox=0 gibbo=0 call open(carmelozza,'t:today','R') call open(feffeo,'t:todrl','W') call spezzettazza(primadeifili) call close(feffeo) call open(feffeo,'t:mess','W') do until EOF(carmelozza) lizeazza=readln(carmelozza) if lizeazza=msgday | lizeazza=msgmir then do messalina=1 writeln(feffeo,lizeazza) lizeazza=readln(carmelozza) end writeln(feffeo,lizeazza) end call close(feffeo) call close(carmelozza) call winsozz address YAMEXP text ID TIPPO LABEL "Today's Aminet uploads" address YAMEXP text ID DATTO LABEL daten call open(ftodrl,'t:todrl','R') call rito call close(ftodrl) end if find(eccolo,settima) then do tipox=1 call open(carmelozza,'t:today','R') gibbo=0 call open(feffeo,'t:todrl','W') call spezzettazza(primadeifili) call close(feffeo) gibbo=1 call open(feffeo,'t:wekmd','W') call spezzettazza(primadeifilis) call close(feffeo) gibbo=1 call open(feffeo,'t:wekch','W') call spezzettazza(primadeifilis) call close(feffeo) call open(feffeo,'t:mess','W') do until EOF(carmelozza) lizeazza=readln(carmelozza) if lizeazza=msgday | lizeazza=msgmir then do messalina=1 writeln(feffeo,lizeazza) lizeazza=readln(carmelozza) end writeln(feffeo,lizeazza) end call close(feffeo) call close(carmelozza) call winsozz address YAMEXP text ID TIPPO LABEL "This week's Aminet uploads" address YAMEXP text ID DATTO LABEL daten call open(ftodrl,'t:todrl','R') call rito call close(ftodrl) end statino=' Now you can select the archives...' address YAMEXP text ID STATUS LABEL statino end return carla: select when pos('K',sdimension)>0 then do sdimension=strip(sdimension,,'K') sdimension=sdimension || '000' end when pos('M',sdimension)>0 then do sdimension=strip(sdimension,,'M') if pos('.',sdimension)>0 then do sdimension=compress(sdimension,'.') sdimension=sdimension || '00' end else do sdimension=sdimension || '000' end sdimension=sdimension || '000' end otherwise sdimension=0 end return